-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unified some string translations #72
base: master
Are you sure you want to change the base?
Conversation
made new functionality compatible to Qt4
Looks ok on a first quick check (without compiling) and should make translating indeed a lot easier. The changes to make the @mzanetti I would prefer it if this could be hold back until after a 2.1 release, unless we're absolutely sure no new translations will be needed after these changes. As Transifex is currently in a pretty good shape. Adding new translations (or changing existing ones) means we'll need to wait again until (the maintained ones) are updated. |
@RobertMe Qt disambiguates strings by context. In the case of C++ files, each QObject derived class has a static tr() function, which can of course be called from everywhere. The class defines the context and thus reduces the number of duplicates if the same string with the same context is found. But my concerns are exactly the same as yours - I think it will invalidate all translations... I don't know if a mixture is possible - so for common strings like 'Ok' and 'Cancel' use the IDs, for other stuff keep it like it is. The drawback is, that each UI needs to share the same structure QML-wise, otherwise we will get different contexts again. |
If they can be combined (line and id based) IMO it would be best to first replace the generic ones, like Cancel, Ok, Media, Now Playing, Keypad, ..., as those are also the most annoying. And then creating all the new ones using ids, and one by one, when needed, replacing the remaining ones. |
I've tested it and it looks quite good here. I agree that I'd like to hold this back until after 2.1 though. @tempura-san Renaming qml files in the ubuntu port requires you to update the qrc file too (It complains about SettingsSheet.qml not found right now). |
@mzanetti Thanks for the hint - I have updated the pull request (always wanted to try a forced push ;)). |
Building fine on Sailfish too. When updating the translations I've found another issue which we have to put some thoughts in, when we're going for an id based approach. Sometimes different apps use different lines. Sailfish uses `Do you want to resume playback from ...?" in a Yes/No based dialog approach (Sailfish default), while Ubuntu uses "Resume from ..." in a popup menu based approach (the same as Kodi shows it). So in those cases we still need multiple lines for the different apps, although those would of course be rare. |
Here is a small start which should fix at least some redundancies. Basically I have renamed some QML files and added class names before the tr() function when applicable.
@RobertMe I had to add some conditional stuff to your mpris additions in order to keep the Qt4 based flavours buildable (e2e67bd). Could you please check if they are neutral for Sailfish?
@mzanetti Please check also for the Ubuntu UI.
Some more strings will be unified, once I finish reworking Harmattan and Maemo stuff - but this will take some more time. And also then, we cannot get completely rid of duplicates... Most likely an ID based translation approach would work best, but this would need a major overhaul.